differentiating sinx and cosx